<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">  
  <title>我的评论 - {:cms('title')}</title>
{include file="app/template/pc/default_pc/home_header.html"}
<div class="layui-body" style="padding: 20px;overflow: auto;">
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  <ul class="layui-tab-title">
    <a href="javascript:;"><li class="layui-this">我的评论</li></a>
  </ul>
</div> 
<div style="overflow: auto;">
<table class="layui-table biaoge" lay-size="lg">
  <colgroup>
    <col width="200">
    <col width="500">
    <col width="100">
    <col>
  </colgroup>
  <thead>
    <tr>
      <th>标题</th>
      <th>评论内容</th>
      <th>评论时间</th>
    </tr> 
  </thead>
  <tbody>
{volist name=":fun_s('comment',array('open'=>1,'uid'=>session('userid')),'id desc','10,false',0)" id="vo"}
    <tr>
      <th>
      	{if condition="$vo['model'] eq '0'"}
      	<a target="_blank" href="*URL*/d_{:fun_sc_p('danye', array('id'=>$vo['fid']), 'show')}.html"> {:cut(fun_sc_p('danye', array('id'=>$vo['fid']), 'title'),10)}</a>
      	{else /}
       <a target="_blank" href="*URL*/s_{:m($vo['model'])}_{$vo.fid}.html"> {:cut(fun_sc_p(m($vo['model']), array('id'=>$vo['fid']), 'title'),20)}</a>
       {/if}
      </th>
      <th>{$vo.content|htmltext|cut=###,300}</th>
      <td>{$vo.time|timeinfo}</td>
    </tr>
{/volist}
  </tbody>
</table>
</div>
<div class="pages">
{:fun_s('comment',array('open'=>1,'uid'=>session('userid')),'id desc','10,false',0)->render()}
<div>
</div>
{include file="app/template/pc/default_pc/home_footer.html"}
<script>
layui.use('form',function(){
  var form = layui.form
  ,jq = layui.jquery;
  
  jq('.biaoji').click(function(){
    var ids = jq(this).attr('ids');
      loading = layer.load(2, {
        shade: [0.2,'#000']
      });
      jq.getJSON('{:url("api/api/xiaoxi", array('id'=>input('id')))}?ids='+ids, function(data) {
        if(data.code == 200){
          layer.close(loading);
          layer.msg(data.msg, {icon: 1, time: 1000}, function(){
            location.reload();
          });
        }else{
          layer.close(loading);
          layer.msg(data.msg, {icon: 2, anim: 6, time: 1000});
        }
      });
  });
    
 
});
</script>